
const db = require('../serve/db.js')
function result(status,data,msg){
    this.status = status;
    this.data = data || {};
    this.msg = msg;
}

function getArtical(req,res){
    let form = 'artical';
    let hash = req.query.hash||null;
    if(!form){
        res.send(new result(110,'','未定义查询条件'));
        return
    }
    db.find(form,hash?{hash:hash}:null,function(r){
        res.send(new result(200,r,'成功'))
    });
}
module.exports = getArtical